package com.ruoyi.technician.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.technician.mapper.TechnicianShieldMapper;
import com.ruoyi.technician.domain.TechnicianShield;
import com.ruoyi.technician.service.ITechnicianShieldService;

/**
 * 屏蔽用户Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-07
 */
@Service
public class TechnicianShieldServiceImpl implements ITechnicianShieldService 
{
    @Autowired
    private TechnicianShieldMapper technicianShieldMapper;

    /**
     * 查询屏蔽用户
     * 
     * @param id 屏蔽用户主键
     * @return 屏蔽用户
     */
    @Override
    public TechnicianShield selectTechnicianShieldById(Long id)
    {
        return technicianShieldMapper.selectTechnicianShieldById(id);
    }

    /**
     * 查询屏蔽用户列表
     * 
     * @param technicianShield 屏蔽用户
     * @return 屏蔽用户
     */
    @Override
    public List<TechnicianShield> selectTechnicianShieldList(TechnicianShield technicianShield)
    {
        return technicianShieldMapper.selectTechnicianShieldList(technicianShield);
    }

    /**
     * 新增屏蔽用户
     * 
     * @param technicianShield 屏蔽用户
     * @return 结果
     */
    @Override
    public int insertTechnicianShield(TechnicianShield technicianShield)
    {
        technicianShield.setCreateTime(DateUtils.getNowDate());
        return technicianShieldMapper.insertTechnicianShield(technicianShield);
    }

    /**
     * 修改屏蔽用户
     * 
     * @param technicianShield 屏蔽用户
     * @return 结果
     */
    @Override
    public int updateTechnicianShield(TechnicianShield technicianShield)
    {
        technicianShield.setUpdateTime(DateUtils.getNowDate());
        return technicianShieldMapper.updateTechnicianShield(technicianShield);
    }

    /**
     * 批量删除屏蔽用户
     * 
     * @param ids 需要删除的屏蔽用户主键
     * @return 结果
     */
    @Override
    public int deleteTechnicianShieldByIds(Long[] ids)
    {
        return technicianShieldMapper.deleteTechnicianShieldByIds(ids);
    }

    /**
     * 删除屏蔽用户信息
     * 
     * @param id 屏蔽用户主键
     * @return 结果
     */
    @Override
    public int deleteTechnicianShieldById(Long id)
    {
        return technicianShieldMapper.deleteTechnicianShieldById(id);
    }
}
